using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

using FreeFlow.Client;

namespace FreeFlow.WinFormsControls
{
	/// <summary>
	/// Base control for anything that can connect to the engine.
	/// </summary>
	public class ConnectableControl : System.Windows.Forms.UserControl
	{
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

    /// <summary>
    /// Creates a new <see cref="ConnectableControl"/> instance.
    /// </summary>
		public ConnectableControl()
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();
		}

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Component Designer generated code
		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
		}
		#endregion

    private Connection connection;
    /// <summary>
    /// Gets or sets the engine connection.
    /// </summary>
    [Description("The connection used to connect to the engine")]
    [Category(Constants.FreeFlowCategory)]
    public virtual Connection Connection
    {
      get {	return connection; }
      set { connection = value; }
    }
	}
}
